package com.frank.synchronizeProblem;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 小石潭记
 * @date 2021/8/25 14:38
 * @Description: ${todo}
 */
@Service
public class SynchronizedService {

    @Autowired
    private EmployeeService employeeService ;

    // 同步
    public synchronized void synchronizedAddEmployee() {
        employeeService.test();
    }
}

